package cn.fsw.pethome.system.mapper;

import cn.fsw.pethome.base.mapper.BaseMapper;
import cn.fsw.pethome.system.domain.Menu;
import cn.fsw.pethome.system.domain.Role;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author fsw
 * @since 2022-10-19
 */
@Repository
public interface RoleMapper extends BaseMapper<Role> {

    void addMenu(@Param("id") Long id,@Param("menus") List<Long> menus);

    void addPer(@Param("id")Long id, @Param("permissions") List<Long> permissions);

    Role selectBySn(String sn);


    List<Menu> queryMenuByRoleId(Long roleid);

    List<Long> queryPermissionByRoleId(Long roleid);

    void deleteMenu(Long id);

    void deletePer(Long id);

    List<Long> selectEmpAndRole(Long id);
}
